#include <stdio.h>
int main() {
    int num = 10;
    int count = 0; // 计数
    while (num) {
        if (num % 2 == 0) {
            if (num % 2 == 1) {
                count++;
            }
            num = num / 2;
        }
    }
    printf("二进制中1的个数 = %d\n",count);
    return 0;
}